﻿@model ListViewModel
@{
    Page.Title = Model.Nav.NavName + "-" + Model.SiteConfig.SiteName;
    #region 公共数据
    ViewBag.SiteConfig = Model.SiteConfig;
    ViewBag.HeaderViewModel = Model.HeaderViewModel;
    ViewBag.FooterViewModel = Model.FooterViewModel;
    #endregion
    Layout = "~/Areas/WebAdmin/Views/Template/_Layout.cshtml";
}

<div class="bannerBg">
    <img src='@Model.Nav.BannerImg' alt="@Model.Nav.NavName" class="img-responsive bc" />

</div>

<!-- banner end-->
<div class="bgInner">
    <dl class="baseWidth bc container">
        <dt class="title">@Model.Nav.NavName</dt>
        <dd>
            @if (Model.ListInfo != null)
            {
                <ul class="linksList">
                    @foreach (var item in Model.ListInfo)
                {
                    <li><a href="@item.LinksUrl" target="@item.LinksTarget"><span>@item.Title</span></a></li>
                    }
                </ul>
            }

            @if (Model.MaxPagerCount > 1)
            {
                var pager = new DotNetMVC.Common.CommonPager();
                pager.CurrentPageClassName = "active";
                pager.MaxPagerCount = Model.MaxPagerCount;
                pager.PageIndex = Model.PageIndex;//这些数据，cshtml不知道，就必须让Action传递给我们
                                                  //对于所有cshtml要用到，但是又获取不到的数据，都由Action来获取，然后放到ViewBag或者Model中传递给cshtml
                pager.PageSize = Model.PageSize;
                pager.TotalCount = Model.TotalCount;
                pager.UrlPattern = "/Link/" + Model.Nav.Id + "/list-{pn}.html";

                <div id="pager">
                    @Html.Raw(pager.GetPagerHtml())
                </div>
            }
        </dd>
    </dl>
    <!--container end-->
</div>
